package com.gzucm.Scholarship.entity;

import com.gzucm.Scholarship.common.base.BaseEntity;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.NoArgsConstructor;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Table;
import javax.validation.constraints.NotBlank;

@Data
@Entity
@ApiModel
@NoArgsConstructor
@Table(name = "user_info")
public class UserInfo extends BaseEntity {

    @NotBlank(message = "登录名不能为空")
    @ApiModelProperty(value = "登录名", required = true)
    @Column(name = "login_name", nullable = false)
    private String loginName;

    @NotBlank(message = "密码不能为空")
    @ApiModelProperty(value = "密码", required = true)
    @Column(name = "password", nullable = false)
    private String password;

    @ApiModelProperty(value = "用户类型", hidden = true, required = false)
    @Column(name = "type", nullable = false)
    private Integer type;

    @ApiModelProperty(value = "关联账号", hidden = true, required = false)
    @Column(name = "account", nullable = true)
    private String account;

}
